package com.iphanta.community.remote.feign;

import com.iphanta.community.remote.traffic.TIMAccountImportRequest;
//import com.iphanta.community.remote.traffic.tim.TimSendMessageRequest;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @author 墨声 E-mail: zehong.hongframe.huang@gmail.com
 * create time: 4/15/22 2:09 PM
 */
@FeignClient(value = "tx-im-server", url = "${tx.im.server}")
public interface TecentImFeign {

    @PostMapping(value = "/im_open_login_svc/account_import")
    Object accountImport(
            @RequestParam(name = "sdkappid") Long sdkappid,
            @RequestParam(name = "identifier") String identifier,
            @RequestParam(name = "usersig") String usersig,
            @RequestParam(name = "random") Integer random,
            @RequestParam(name = "contenttype") String contenttype,
            @RequestBody Map<String, Object> request);

    @PostMapping(value = "/openim/sendmsg")
    Object sendMessage(@RequestParam(name = "sdkappid") Long sdkappid,
                       @RequestParam(name = "identifier") String identifier,
                       @RequestParam(name = "usersig") String usersig,
                       @RequestParam(name = "random") Integer random,
                       @RequestParam(name = "contenttype") String contenttype,
                       @RequestBody Map<String, Object> request);

//    Object batchSendMessage();
//
//    TimGetroammsg adminGetroammsg();

}
